package com.qzf.test.model;

import java.util.Random;

public class Layer {



    private Integer rowNum;
    private Integer colNum;
    private Integer capacity;

    //目前图层卡牌数量
    private Integer size;

    //定义一个格子的二维数组
    private Cell [][] cells;

    private Integer offsetx;
    private Integer offsety;

    //tucengtuixiang
    private Layer parent;

    public Layer getParent() {
        return parent;
    }

    public void setParent(Layer parent) {
        this.parent = parent;
    }

    public  Layer(Integer rowNum, Integer colNum){
        this.rowNum=rowNum;
        this.colNum=colNum;
        this.capacity=rowNum*colNum;
        this.cells=new Cell[this.rowNum][this.colNum];
        this.size=0;
        this.offsetx=new Random().nextInt(100);
        this.offsety=new Random().nextInt(100);
    }

    public Integer getOffsetx() {
        return offsetx;
    }

    public void setOffsetx(Integer offsetx) {
        this.offsetx = offsetx;
    }

    public Integer getOffsety() {
        return offsety;
    }

    public void setOffsety(Integer offsety) {
        this.offsety = offsety;
    }

    //


    public Integer getRowNum() {
        return rowNum;
    }

    public void setRowNum(Integer rowNum) {
        this.rowNum = rowNum;
    }

    public Integer getColNum() {
        return colNum;
    }

    public void setColNum(Integer colNum) {
        this.colNum = colNum;
    }

    public Integer getCapacity() {
        return capacity;
    }

    public void setCapacity(Integer capacity) {
        this.capacity = capacity;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Cell[][] getCells() {
        return cells;
    }

    public void setCells(Cell[][] cells) {
        this.cells = cells;
    }
}